package kcn.ip21.utils;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

public class DButils {

	private static SessionFactory sf;
	public static Session getSession(){
		sf=new AnnotationConfiguration().configure().buildSessionFactory();
		Session session= sf.openSession();
	System.out.println("get session");
		return session;
	}
	public static void closeSession(){
		sf.close();
	}
}
